<template>
  <div class="goods">
    <el-card class="box-card">
      <div slot="header" class="clearfix">
        <span style="line-height: 36px;">预期收货通知</span>
        <el-button style="float: right;" type="primary" @click="dialogAdd.visible = true" v-if="USER.auth.indexOf('inOperation_daohuo_add')!==-1">新增预期收货通知</el-button>
      </div>
      <s-table
        :table="table"
        @http="tableWatch">
        <el-row>
          <el-col :xs="24" :lg="{span: 4, offset: 0}">
            <el-form-item label="名称" prop="gysmc">
              <el-input type="text"
                        class="input"
                        v-model="autoVue_table_gysmc"
                        placeholder="供应商名称" spellcheck="false" auto-capitalize="off" auto-complete="off"
                        auto-correct="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :lg="{span: 4, offset: 1}">
            <el-form-item label="PO编号" prop="dycgdbh">
              <el-input type="text"
                        class="input"
                        v-model="autoVue_table_dycgdbh"
                        placeholder="关联PO编号" spellcheck="false" auto-capitalize="off" auto-complete="off"
                        auto-correct="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :lg="{span: 4, offset: 1}">
            <el-form-item label="ASN编号" prop="asnbh">
              <el-input type="text"
                        class="input"
                        v-model="autoVue_table_asnbh"
                        placeholder="ASN编号" spellcheck="false" auto-capitalize="off" auto-complete="off"
                        auto-correct="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :lg="{span: 4, offset: 1}">
            <el-form-item label="ASN类型" prop="asnlx">
              <el-select v-model="autoVue_table_asnlx"
                         filterable
                         remote
                         placeholder="请选择ASN类型">
                <el-option
                  v-for="item in dictionary.asnlx"
                  :key="item.id"
                  :label="item.ddlx"
                  :value="item.id">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :lg="{span: 4, offset: 1}">
            <el-form-item label="ASN状态" prop="asnzt">
              <el-select v-model="autoVue_table_asnzt"
                         placeholder="ASN状态">
                <el-option
                  label="全部"
                  value=""></el-option>
                <el-option
                  v-for="item in DAOHUO.asnzt"
                  :key="item.dictionaryid"
                  :label="item.value"
                  :value="item.dictionaryid">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :xs="24" :lg="{span: 4, offset: 0}">
            <el-form-item label="码盘状态" prop="mpzt">
              <el-select v-model="autoVue_table_mpzt"
                         placeholder="码盘状态">
                <el-option
                  label="全部"
                  value=""></el-option>
                <el-option
                  label="未码盘"
                  value="0"></el-option>
                <el-option
                  label="已码盘"
                  value="1"></el-option>
              </el-select>
            </el-form-item>

          </el-col>
          <el-col :xs="24" :lg="{span: 4, offset: 1}">
            <el-form-item label="审核状态" prop="shzt">
              <el-select v-model="autoVue_table_shzt"
                         placeholder="审核状态">
                <el-option
                  label="全部"
                  value=""></el-option>
                <el-option
                  label="未审核"
                  value="0"></el-option>
                <el-option
                  label="已审核"
                  value="1"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :lg="{span: 4, offset: 1}">
            <el-form-item label="打印状态" prop="dyzt">
              <el-select v-model="autoVue_table_dyzt"
                         placeholder="打印状态">
                <el-option
                  label="全部"
                  value=""></el-option>
                <el-option
                  label="未打印"
                  value="0"></el-option>
                <el-option
                  label="已打印"
                  value="1"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :lg="{span: 4, offset: 1}">
            <el-form-item label="创建时间" prop="cjsj">
              <el-date-picker
                v-model="autoVue_table_cjsj"
                type="daterange"
                placeholder="选择日期范围">
              </el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>
        <el-form-item slot="multiSelect" label="多选操作" prop="multiSelect" v-if="table.multiSelect">
          <el-row>
            <el-col :span="8">
              <el-button size="small" type="info" @click="tableMultiPrint('')">多选打印</el-button>
            </el-col>
            <el-col :span="8">
              <el-button size="small" type="info" @click="tableComplete('')">多选标记</el-button>
            </el-col>
            <el-col :span="8">
              <el-button size="small" type="info" @click="tableQualityTesting('')">生成质检单</el-button>
            </el-col>
          </el-row>
        </el-form-item>
        <el-table-column
          fixed="right"
          align="center"
          slot="operation"
          class-name="operationMore"
          label="操作"
          width="260">
          <template slot-scope="s">
            <el-button type="info" size="mini" @click="dialogUploadOpen(s.row.id)">附件管理</el-button>
            <el-button type="info" size="mini" @click="dialogSearchOpen(s.row)" icon="search">查看</el-button>
            <el-button type="success" size="mini"  @click="dialogOpen('put', s.row)" v-if="USER.auth.indexOf('inOperation_daohuo_edit')!==-1 && s.row.shzt == '0'">编辑</el-button>
            <el-button type="danger" size="mini" @click="tableDelete(s.row)" v-if="USER.auth.indexOf('inOperation_daohuo_delete')!==-1 &&  s.row.shzt == '0'" >删除</el-button>
            <el-button type="info" size="mini" @click="dialogASNOpen(s.row)">查看ASN收货</el-button>
            <el-button type="success" size="mini" @click="tableComplete(s.row)" v-if="USER.auth.indexOf('inOperation_daohuo_sign')!==-1 && s.row.asnzt == '1'">标记收货完成</el-button>
            <el-button type="info" size="mini" @click="tableMultiPrint(s.row)"><i class="fa fa-print" aria-hidden="true"> 打印</i></el-button>
            <el-button size="mini" @click="tableQualityTesting(s.row)" v-if="s.row.zjzt == '0' && s.row.shzt == '1' && (s.row.asnzt =='2' || s.row.asnzt =='4')">生成质检单</el-button>
            <!--
            <el-tooltip placement="top">
              <div slot="content">相关查询操作</div>
              <el-popover
                popper-class="demo-table-expand"
                placement="right"
                title="相关查询操作"
                trigger="click">
                <slot name="content">
                  <el-button type="success" size="mini"  @click="" ></el-button>
                  <el-button type="success" size="mini" @click=""></el-button>
                </slot>
                <el-button slot="reference" type="info" icon="more" :plain="true" size="mini" class="__reference"></el-button>
              </el-popover>
            </el-tooltip>
            -->
            <!--
            <el-tooltip placement="top" v-if="s.row.shzt == '0'">
              <div slot="content">更多可用操作</div>
              <el-popover
                popper-class="demo-table-expand"
                placement="right"
                title="更多可用操作"
                trigger="click">
                <slot name="content">
                 </slot>
                <el-button slot="reference" type="info" icon="more" :plain="true" size="mini" class="__reference"></el-button>
              </el-popover>
            </el-tooltip>
            -->
            <!--<el-tooltip placement="top" >-->
              <!--<div slot="content">更多可用操作</div>-->
              <!--<el-popover-->
                <!--popper-class="demo-table-expand"-->
                <!--placement="right"-->
                <!--title="更多可用操作"-->
                <!--trigger="click">-->
                <!--<slot name="content">-->
                  <!--<-->
                  <!--&lt;!&ndash;<el-button type="info"  size="mini" @click="tableExport(s.row)">导出</el-button>&ndash;&gt;-->
                <!--</slot>-->
                <!--<el-button slot="reference" type="info" icon="more" :plain="true" size="mini" class="__reference"></el-button>-->
              <!--</el-popover>-->
            <!--</el-tooltip>-->
          </template>
        </el-table-column>
      </s-table>
    </el-card>
    <s-dialog :dialog="dialogAdd" :closeTip="false">
      <p slot="title">请选择新增方式</p>
      <el-row>
        <el-col :span="11" :offset="0">
          <el-button type="info" @click="dialogOpen('add')" size="large">通过新增</el-button>
        </el-col>
        <el-col :span="11" :offset="1">
          <el-button type="success" @click="dialogPoOpen()" size="large">通过PO提取</el-button>
        </el-col>
      </el-row>
    </s-dialog>
    <s-dialog :dialog="dialog" :close="dialogInit">
      <p slot="title">{{dialog.title}}预期到货通知<span>供应商： {{ formDialog1.gysmc || '等待选择供应商' }}</span></p>
      <el-tabs v-model="dialog.activeName">
        <el-tab-pane label="预期到货表头" name="1" disabled>
          <s-form :form="formDialog1" ref="formDialog1">
            <el-row>
              <el-col :xs="24" :lg="{span: 7, offset: 0}" class="">
                <el-form-item prop="asnbh" label="ASN编号">
                  <el-input
                    type="text"
                    :disabled="dialog.po"
                    v-model="formDialog1.asnbh"
                    placeholder="ASN编号"></el-input>
                </el-form-item>
              </el-col>
              <el-col :xs="24" :lg="{span: 7, offset: 1}" class="">
                <el-form-item label="预计到货时间" prop="yjdhsj">
                  <el-date-picker
                    v-model="formDialog1.yjdhsj"
                    type="daterange"
                    placeholder="选择日期范围">
                  </el-date-picker>
                </el-form-item>
              </el-col>
              <el-col :xs="24" :lg="{span: 7, offset: 1}" class="">
                <el-form-item prop="yxj" label="优先级">
                  <el-select
                    :disabled="dialog.po"
                    v-model="formDialog1.yxj" placeholder="请选择">
                    <el-option
                      v-for="item in DAOHUO.yxj"
                      :key="item.dictionaryid"
                      :label="item.value"
                      :value="item.dictionaryid">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :xs="24" :lg="{span: 7, offset: 0}" class="">
                <el-form-item prop="asnlx" label="ASN类型">
                  <el-select v-model="formDialog1.asnlx"
                             :disabled="dialog.po"
                             filterable
                             remote
                             placeholder="请选择ASN类型"
                             @change="dialogRemoteShzt"
                             :remote-method="dialogRemoteASNlx">
                    <el-option
                      v-for="item in dialog.wmsPurchaseOrder"
                      :key="item.id"
                      :label="item.ddlx"
                      :value="item.id">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :xs="24" :lg="{span: 7, offset: 1}" class="">
                <el-form-item prop="gysid" label="供应商编号">
                  <el-select v-model="formDialog1.gysid"
                             :disabled="dialog.po || dialog.title === '修改'"
                             filterable
                             remote
                             placeholder="请选择供应商"
                             @change="dialogSupplierGysid">
                    <el-option
                      v-for="item in dialog.id"
                      :key="item.id"
                      :label="item.bh + '    ' + item.mc"
                      :value="item.id">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :xs="24" :lg="{span: 7, offset: 1}" class="" v-if="formDialog1.asnlx">
                <el-form-item label="审核状态">
                  <div class="s-content">
                    <el-tag type="info">{{formDialog1.shzt || '请选择ASN类型'}}</el-tag>
                  </div>
                </el-form-item>
              </el-col>
            </el-row>
          </s-form>
        </el-tab-pane>
        <el-tab-pane label=" 预期到货明细" name="2" disabled v-if="dialog.title !== '修改'">
          <div class="__table">
            <el-button @click="dialogMxOpen('add')" class="__table_button" v-if="!dialog.po"><i class="el-icon-plus"></i></el-button>
            <s-table :table="tableMx" :pagination="false" :control="dialog.po" ref='tableMx'>
              <el-table-column

                fixed="right"
                align="center"
                slot="operation"
                class-name="operationMore"
                label="操作"
                width="120">
                <template slot-scope="s">
                  <el-button size="mini" @click="dialogMxOpen('set', s.row)" v-if="dialog.po && s.row.hppc && s.row.lock === -1">调整</el-button>
                  <el-button type="success" icon="edit" size="mini" v-if="!dialog.po" @click="dialogMxOpen('put', s.row)"></el-button>
                  <el-button type="info" size="mini" v-if="dialog.po && s.row.lock === -1 && s.row.yqsl != 0" @click="dialogMxOpen('po', s.row)">分配</el-button>
                  <el-button type="danger" icon="delete" size="mini" v-if="s.row.lock !== -1" @click="tableMxDelete(s.$index, s.row)"></el-button>
                </template>
              </el-table-column>
            </s-table>
          </div>
        </el-tab-pane>
      </el-tabs>
      <el-button slot="footer" v-if="dialog.activeName !== '1'" @click="dialogPre">上一页</el-button>
      <el-button slot="footer" type="info" v-if="dialog.activeName !== '2' && dialog.title !== '修改'" @click="dialogNext">下一页</el-button>
      <el-button slot="footer" type="success" v-if="dialog.activeName === '2' || dialog.title === '修改'" @click="dialogSave">保存</el-button>
    </s-dialog>
    <s-dialog :dialog="dialogPo" :close="dialogPoInit" :closeTip="false">
      <p slot="title">提取PO</p>
      <s-table :table="tableTqpo" :expand="false" ref="tableTqpo" @http="tableWatch">
        <el-table-column
          fixed="right"
          align="center"
          slot="operation"
          class-name="operationMore"
          label="操作"
          width="80">
          <template slot-scope="s">
            <el-button type="info" size="mini" @click="dialogPoMxOpen(s.row)">提取</el-button>
          </template>
        </el-table-column>
        <el-form-item label="PO编号" prop="bh">
          <el-input type="text"
                    class="input"
                    v-model="autoVue_tableTqpo_bh"
                    placeholder="PO编号" spellcheck="false" auto-capitalize="off" auto-complete="off"
                    auto-correct="off"></el-input>
        </el-form-item>
      </s-table>
      <el-button slot="footer" @click="dialogPoSave">确定</el-button>
    </s-dialog>
    <s-dialog :dialog="dialogPoMx" :close="dialogPoMxInit" :closeTip="false">
      <p slot="title">选择提取条数</p>
      <s-table :table="tableTqpoMx" :expand="false" :multiSelect="true" ref="tableTqpoMx"></s-table>
      <el-button slot="footer" @click="dialogPoMxSave">确定</el-button>
    </s-dialog>
    <s-dialog :dialog="dialogMx" :close="dialogMxInit">
      <p slot="title">{{dialogMx.title}}</p>
      <s-form :form="formDialogMx" ref="formDialogMx">
        <el-row>
          <el-col :xs="24" :lg="{span: 5, offset: 0}" class="">
            <el-form-item prop="bh" label="货品编号">
              <el-select v-model="formDialogMx.bh"
                         filterable
                         :disabled="dialog.po"
                         remote
                         @change="dialogMxChangeBh"
                         :remote-method="dialogMxRemoteBh"
                         placeholder="请选择货品编号">
                <el-option
                  v-for="item in dialogMx.hpid"
                  :key="item.goodsId"
                  :label="item.goodsBh"
                  :value="item.goodsBh">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :lg="{span: 5, offset: 1}" class="">
            <el-form-item prop="mc" label="货品名称">
              <el-input
                type="text"
                disabled
                v-model="formDialogMx.mc"
                placeholder="货品名称"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :lg="{span: 5, offset: 1}" class="">
            <el-form-item prop="gg" label="规格">
              <el-input
                type="text"
                disabled
                v-model="formDialogMx.gg"
                placeholder="规格"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :lg="{span: 5, offset: 1}" class="">
            <el-form-item prop="ms" label="入库单位">
              <el-select v-model="formDialogMx.ms"
                         :disabled="dialog.po"
                         @change="dialogMxChangeMs"
                         placeholder="请选择入库单位">
                <el-option
                  v-for="item in dialogMx.pack"
                  :key="item.id"
                  :label="item.ms"
                  :value="item.ms">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :xs="24" :lg="{span: 5, offset: 0}" class="">
            <el-form-item prop="tj" label="体积">
              <el-input
                type="text"
                disabled
                v-model="formDialogMxtj"
                placeholder="体积"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :lg="{span: 5, offset: 1}" class="">
            <el-form-item prop="jz" label="净重">
              <el-input
                type="text"
                disabled
                v-model="formDialogMxjz"
                placeholder="净重"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :lg="{span: 5, offset: 1}" class="">
            <el-form-item prop="zl" label="毛重">
              <el-input
                type="text"
                disabled
                v-model="formDialogMxzl"
                placeholder="毛重"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :lg="{span: 5, offset: 1}" class="">
            <el-form-item prop="je" label="金额(元)">
              <el-input
                type="text"
                disabled
                v-model="formDialogMxje"
                placeholder="金额(元)"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :xs="24" :lg="{span: 7, offset: 0}" class="">
            <el-form-item prop="hppc" label="货品批号">
              <el-input
                type="text"
                v-model="formDialogMx.hppc"
                placeholder="货品批号"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :lg="{span: 7, offset: 1}" class="">
            <el-form-item prop="scrq" label="生产日期">
              <el-date-picker
                v-model="formDialogMx.scrq"
                type="date"
                placeholder="生产日期">
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :lg="{span: 7, offset: 1}" class="">
            <el-form-item prop="sxrq" label="失效日期">
              <el-input
                type="text"
                disabled
                v-model="formDialogMxsxrq"
                placeholder="失效日期"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :xs="24" :lg="{span: 7, offset: 0}" class="">
            <el-form-item prop="yqsl" label="主单位">
              <el-input
                type="text"
                :disabled="formDialogMx.ms && dialogMx.packValue.bzlx !== 0"
                v-model="formDialogMx.yqsl"
                placeholder="主单位数量"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :lg="{span: 7, offset: 1}" class="">
            <el-form-item prop="xdwsl" label="箱单位">
              <el-input
                type="text"
                :disabled="formDialogMx.ms && dialogMx.packValue.bzlx === 0"
                v-model="formDialogMx.xdwsl"
                placeholder="箱单位数量"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :lg="{span: 7, offset: 1}" class="">
            <el-form-item prop="je" label="总金额(元)">
              <el-input
                type="text"
                v-model="formDialogMx.sum"
                placeholder="总金额(元)"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-form-item prop="bz" label="备注">
            <el-input
              type="textarea"
              :rows="2"
              v-model="formDialogMx.bz"
              placeholder="备注"></el-input>
          </el-form-item>
        </el-row>
      </s-form>
      <el-button slot="footer" @click="dialogMxSave">保存</el-button>
    </s-dialog>
    <s-dialog :dialog="dialogSearch" :close="dialogSearchInit" :closeTip="false">
      <p slot="title">查看明细<span>{{dialogSearch.row.bh}}</span></p>
      <s-table :table="tableSearch" ref='tableSearch' :pagination="false" :control="true"></s-table>
      <el-button slot="footer" type="warning" v-if="dialogSearch.row.shzt == '0'" @click="tableExamine(dialogSearch.row)">通过审核</el-button>
      <!--<el-button slot="footer" @click="dialogSearchSave">好</el-button>-->
    </s-dialog>
    <s-dialog :dialog="dialogASN" :close="dialogASNInit">
      <p slot="title">查看ASN收货</p>
      <s-table :table="tableASN" ref="tableASN" @http="tableWatch" :pagination="false">
      </s-table>
    </s-dialog>
    <s-dialog :dialog="dialogUpload" :close="dialogUploadInit" :closeTip="false">
      <p slot="title">附件管理</p>
      <el-upload
        ref="upload"
        name="zxwms_shipment"
        :action="action"
        :before-upload="dialogUploadBefore"
        :on-success="dialogUploadSuccess"
        :on-error="dialogUploadError"
        :auto-upload="false">
        <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
        <el-button style="margin-left: 10px;" size="small" type="success" @click="dialogUploadSubmit">上传到服务器</el-button>
        <!--<div slot="tip" class="el-upload__tip">只能上传Excel文件</div>-->
      </el-upload>
      <s-table :table="tableUpload" ref="tableUpload"  :expand="false" @http="tableWatch">
        <el-table-column
          fixed="right"
          align="center"
          slot="operation"
          class-name="operationMore"
          label="可用操作"
          width="125">
          <template slot-scope="s">
            <el-button type="info" size="mini" @click="downloadfile(s.row)">下载</el-button>
          </template>
        </el-table-column>
      </s-table>
      <el-button slot="footer" @click="dialogUploadSave">好</el-button>
    </s-dialog>
  </div>
</template>

<script>
  import {AutoVue, AutoPromise, GetLodop, FormatterTime} from '~/plugins/Tools';
  import Gonghuoqingdan from '~/components/zxwmsPrint/gonghuoqingdan.vue';
  import Vue from 'vue';
  import Config from '~/config';
  let {
    PublicImageServer,
  } = Config;

  function __form1_origin () {
    return {
      'asnbh': { value: '', rule: [ 'vNull' ], cRemarks: '' },
      'yxj': { value: '', rule: [ 'vNull' ], cRemarks: '' },
      'ckmc': { value: '', rule: [ 'vNull' ], cRemarks: '' },
      'zt': { value: '', rule: [ 'vNull' ], cRemarks: '' },
      'shr': { value: '', rule: [ 'vNull' ], cRemarks: '' },
      'zdr': { value: '', rule: [ 'vNull' ], cRemarks: '' },
      asnzt: { value: '', rule: [ 'vNull__change' ], cRemarks: '' },
      'shsj': { value: '', rule: [ 'vNull' ], cRemarks: '' },
      shzt: { value: '', rule: [], cRemarks: '' },
      dyzt: { value: '', rule: [ 'vNull__change' ], cRemarks: '' },
      locking: { value: -1, rule: [], cRemarks: '' },
    };
  }
  function __form1 () {
    return {
      ...__form1_origin(),
      gysid: { value: '', rule: [ 'vNull__change' ], cRemarks: '' },
      gysmc: { value: '', rule: [ 'vNull' ], cRemarks: '' },
      hzmc: { value: '', rule: [ 'vNull' ], cRemarks: '' },
      asnlx: { value: '', rule: [ 'vNull' ], cRemarks: '' },
      yjdhsj: { value: [],
        type: 'dateRange',
        rule: [ 'vNull__change' ],
        cRemarks: '' },
      cjsj: { value: '', rule: [ 'vNull' ], cRemarks: '' },
      dycgdbh: { value: '', rule: [ 'vNull' ], cRemarks: '' },
      ddshr: { value: '', rule: [ 'vNull' ], cRemarks: '' },
      shwcsjTime: { value: 0, rule: [ 'vNull' ], cRemarks: '' },
      locking: { value: -1, rule: [ ], cRemarks: '' },
      mpdyzt: { value: '0', rule: [ 'vNull__change' ], cRemarks: '0.未码盘 1.码盘' },
    };
  }
  function __dialogGys () {
    return {
      bh: '',
      mc: '',
      lxr: '',
      xxdz: '',
      dh1: '',
      dh2: '',
      cz: '',
      cs: '',
      sheng: '',
      gj: '',
      yb: '',
    };
  }
  function __formDialogMx_goods () { // hpid
    return {
      mc: { value: '', rule: [], cRemarks: '' },
      bzmc: { value: '', rule: [], cRemarks: '' },
      gg: { value: '', rule: [], cRemarks: '' },
    };
  }
  function __formDialogMx_pack () {
    return {
      tj: { value: '', rule: [], cRemarks: '' },
      jz: { value: '', rule: [], cRemarks: '' },
      zl: { value: '', rule: [], cRemarks: '' },
      je: { value: '', rule: [], cRemarks: '' },
      zdwsl: { value: '', rule: [], cRemarks: '' },
    };
  }
  function __formDialogMx () {
    return {
      bh: { value: '', rule: ['vNull__change'], cRemarks: '' },
      ...__formDialogMx_goods(),
      ms: { value: '', rule: ['vNull__change'], cRemarks: '' },
      ...__formDialogMx_pack(),
      yqsl: { value: '', rule: ['vNull', 'vNumber', 'vNumberZ', 'vNumberZZ'], cRemarks: '' },
      sum: { value: 0, rule: ['vNumber', 'vNumberZ', 'vNumberZZ'], cRemarks: '' },
      xdwsl: { value: '', rule: ['vNull', 'v_XiangYanZhen'], cRemarks: '' },
      bz: { value: '', rule: [], cRemarks: '' },

      hppc: { value: FormatterTime(new Date(), 21), rule: [ 'vNull' ], cRemarks: '' },
      scrq: { value: new Date(), rule: [ 'vNull__change' ], type: 'date', cRemarks: '' },
      sxrq: { value: '', rule: [], cRemarks: '' },
      pssl: { value: '0', rule: ['vNull', 'vNumber', 'vNumberZ', 'vNumberZZ'], cRemarks: '' },
      jssl: { value: '0', rule: ['vNull', 'vNumber', 'vNumberZ', 'vNumberZZ'], cRemarks: '' },
      jsyy: { value: '', rule: ['vNull'], cRemarks: '' },
      dycgmxid: { value: '', rule: [], cRemarks: '' },
    };
  }
  function __tableMx () {
    return {
      column: [
        { label: '货品编号',
          prop: 'hpbh',
          minWidth: '0px',
          cRemarks: '根据货品接口获取',
          search: false },
        { label: '货品名称',
          prop: 'hpmc',
          minWidth: '0px',
          cRemarks: '根据货品接口获取',
          search: false },
        { label: '规格',
          prop: 'gg',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        {
          label: 'NC编码',
          prop: 'nc',
          minWidth: '0px',
          cRemarks: '',
          search: false,
        },
        { label: '主单位',
          prop: 'ms',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '货品批次',
          prop: 'hppc',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '生产日期',
          prop: 'scrq',
          formatter: (row, column) => {
            return FormatterTime(row[column.property || column], 3);
          },
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '主单位数量',
          prop: 'yqsl',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '箱单位数量',
          prop: 'xdwsl',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '状态',
          prop: 'show_zt',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '质检状态',
          prop: 'show_zjzt',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '收货数量',
          prop: 'sdsl',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '失效日期',
          prop: 'sxrq',
          formatter: (row, column) => {
            return FormatterTime(row[column.property || column], 3);
          },
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '破损数量',
          prop: 'pssl',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '拒收数量',
          prop: 'jssl',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '拒收原因',
          prop: 'jsyy',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '未收数量',
          prop: 'wssl',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '备注',
          prop: 'bz',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '收货数量/箱单位',
          prop: 'sdxsl',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '体积',
          prop: 'tj',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '净重',
          prop: 'jz',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '毛重',
          prop: 'zl',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '金额',
          prop: 'je',
          minWidth: '0px',
          cRemarks: '',
          search: false },
      ],
      key: 'hpbh',
      muti: false,
      tableColumn: 8,
    };
  }

  export default AutoVue({
    name: 'inOperation_daohuo-FEcarWms',
    head: {
      'title': '预期到货通知单管理',
      'meta': [
        { 'hid': 'description', 'name': 'description', 'content': '乐速科技平台 预期到货通知单 查看预期到货通知单信息' },
      ],
    },
    data: {
      rkdwControl: 0,
      dictionary: {
        asnlx: [],
      },
      dialogUpload: {
        title: '查看',
        size: 'large',
      },
      tableUpload: {
        column: [
          {
            label: '附件名称',
            prop: 'name',
            minWidth: '0px',
            search: false,
          },
          {
            label: '链接地址',
            prop: 'url',
            minWidth: '0px',
            search: false,
          },
        ],
        data: [ /* {
          hpbh: '20160502',
          hpmc: '王小虎',
          sl: '1518 弄',
          xbh: '1',
        } */ ],
        key: 'id',
        tableColumn: 2,
        muti: false,
      },
      jsonpoid: '',

      table: {
        column: [ { label: '仓库',
          prop: 'ckmc',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '货主',
          prop: 'hzmc',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '供应商名称',
          prop: 'gysmc',
          minWidth: '0px',
          cRemarks: '',
          search: true },
        { label: 'ASN编号',
          prop: 'asnbh',
          minWidth: '0px',
          cRemarks: '',
          search: true },
        { label: 'ASN类型',
          prop: 'show_asnlx',
          minWidth: '0px',
          cRemarks: '',
          search: true },
        { label: 'ASN状态',
          prop: 'show_asnzt',
          minWidth: '0px',
          cRemarks: '',
          search: true },
        { label: 'PO编号',
          prop: 'dycgdbh',
          minWidth: '0px',
          cRemarks: '',
          search: true },
        { label: '码盘状态',
          prop: 'show_mpzt',
          minWidth: '0px',
          cRemarks: '0.未码盘 1.码盘',
          search: true },
        { label: '创建时间',
          prop: 'cjsj',
          minWidth: '0px',
          type: 'DateRange',
          cRemarks: '',
          formatter: (row, column) => {
            return this.a.methods.formatterTime(row[column.property || column], 6);
          },
          search: true },
        { label: '审核状态',
          prop: 'show_shzt',
          minWidth: '0px',
          cRemarks: '',
          search: true },
        { label: '质检状态',
          prop: 'show_zjzt',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '优先级',
          prop: 'yxj',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '预计到货时间',
          prop: 'yjdhsjq',
          minWidth: '0px',
          cRemarks: '',
          formatter: (row, column) => {
            return this.a.methods.formatterTime(row[column.property || column]);
          },
          search: false },
        { label: '制单人',
          prop: 'zdr',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '审核人',
          prop: 'ddshr',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '打印状态',
          prop: 'show_dyzt',
          minWidth: '0px',
          cRemarks: '',
          search: true },
        { label: '打印时间',
          prop: 'dysj',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '收货完成时间',
          prop: 'shwcsjTime',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        ],
        url: '/wmsEstimatedArrivalOrder/list',
        key: 'id',
        tableColumn: 11,
      },
      dialogAdd: {},

      dialogPo: {
        size: 'large',
      },
      tableTqpo: {
        column: [
          { label: '仓库',
            prop: 'ckmc',
            minWidth: '0px',
            cRemarks: '',
            search: false },
          { label: '供应商',
            prop: 'gysmc',
            minWidth: '0px',
            cRemarks: '',
            search: false },
          { label: 'PO编号',
            prop: 'bh',
            minWidth: '0px',
            cRemarks: '',
            search: true },
        ],
        key: 'id',
        tableColumn: 3,
        url: '/wmsEstimatedArrivalOrder/getPoList',
        muti: false,
      },

      dialogPoMx: {
        size: 'large',
        row: {},
      },
      tableTqpoMx: {
        column: [
          { label: '货品编号',
            prop: 'hpbh',
            minWidth: '0px',
            cRemarks: '根据货品接口获取',
            search: false },
          { label: '货品名称',
            prop: 'hpmc',
            minWidth: '0px',
            cRemarks: '根据货品接口获取',
            search: false },
          { label: '单位',
            prop: 'bzmc',
            minWidth: '0px',
            cRemarks: '根据货品接口获取',
            search: false },
          { label: '主单位',
            prop: 'yqsl',
            elInputNumber: {
              max: 'yqsl',
              min: 1,
            },
            minWidth: '0px',
            cRemarks: '根据货品接口获取',
            search: false },
          { label: '箱单位',
            prop: 'xdwsl',
            minWidth: '0px',
            cRemarks: '根据货品接口获取',
            search: false },
          { label: 'id',
            prop: 'dycgmxid',
            minWidth: '0px',
            cRemarks: '根据货品接口获取',
            search: false },
        ],
        key: 'dycgmxid',
        tableColumn: 5,
      },

      dialog: {
        title: '新增',
        size: 'large',
        row: {},
        activeName: '1',
        gysId: 0,
        po: false,
        id: [],
        wmsPurchaseOrder: [],
      },
      formDialog1: __form1(),
      tableMx: __tableMx(),

      dialogMx: {
        title: '新增',
        size: 'large',
        row: {},
        zqlx: '',
        hpid: [],
        pack: [],
        packValue: {
          bzlx: '0',
        },
        data: {}, // good
        step: {},
        sum: 0,
      },
      formDialogMx: __formDialogMx(),

      dialogSearch: {
        size: 'large',
        row: {},
      },
      tableSearch: {
        ...__tableMx(),
        muti: false,
      },

      dialogASN: {
        size: 'large',
      },
      tableASN: {
        column: [ { label: '明细状态',
          prop: 'show_zt',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '质检状态',
          prop: 'show_zjzt',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '货品编号',
          prop: 'hpbh',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '货品名称',
          prop: 'hpmc',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        {
          label: 'NC编码',
          prop: 'nc',
          minWidth: '0px',
          cRemarks: '',
          search: false,
        },
        { label: '规格',
          prop: 'mc',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '主单位',
          prop: 'ms',
          minWidth: '80px',
          cRemarks: '',
          search: false },
        { label: '预期数量',
          prop: 'yqsl',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '收货数量',
          prop: 'sdsl',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '货品批号',
          prop: 'hppc',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '失效日期',
          prop: 'sxrq',
          minWidth: '0px',
          cRemarks: '',
          formatter: (row, column) => {
            return this.a.methods.formatterTime(row[column.property || column], 3);
          },
          search: false },
        { label: '生产日期',
          prop: 'scrq',
          minWidth: '0px',
          cRemarks: '',
          formatter: (row, column) => {
            return this.a.methods.formatterTime(row[column.property || column], 3);
          },
          search: false },
        { label: '破损数量',
          prop: 'pssl',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '拒收数量',
          prop: 'jssl',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '未收数量',
          prop: 'wssl',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '备注',
          prop: 'bz',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '预期数量(箱单位)',
          prop: 'yqxsl',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '收货数量(箱单位)',
          prop: 'sdxsl',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '体积',
          prop: 'tj',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '净重',
          prop: 'jz',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '毛重',
          prop: 'zl',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '金额',
          prop: 'je',
          minWidth: '0px',
          cRemarks: '',
          search: false },
        { label: '拒收原因',
          prop: 'jsyy',
          minWidth: '0px',
          cRemarks: '',
          search: false }],
        key: 'id',
        tableColumn: 14,
      },
    },
    transition: 'slide-fade',
    store: ['DICTIONARY_daohuo', 'DAOHUO', 'USER'],
    methods: {
      dialogUploadInit () {},
      async dialogUploadOpen (rowdata) {
        this.jsonpoid = rowdata;
        let json = await this.get('/wmspoenclosure/list/' + rowdata);
        let temparr = [];
        let i = 0;
        if (json.length > 0) {
          for (let value of json) {
            temparr[i] = { 'id': value.id, 'poid': value.poid, 'name': value.mc, 'url': PublicImageServer.src + '/excel/zxwms/shipment/' + value.mc };
            i++;
          }
        }
        this.tableUpload.data = temparr;

        this.dialogUpload.visible = true;
      },
      dialogUploadBefore (file) {
        /* const isExcel = file.type === 'application/vnd.ms-excel';
        const isLt = file.size / 1024 / 1024 < 50;
        if (!isExcel) {
          this.$message.error('上传文件只能是 Excel 格式!');
        }
        if (!isLt) {
          this.$message.error('上传头像图片大小不能超过 50MB!');
        }
        return (isExcel) && isLt; */
      },
      async dialogUploadSuccess (res, file, fileList) {
        let poid = this.jsonpoid;
        try {
          await this.post('/wmspoenclosure/add', {
            mc: res.filename,
            poid: poid,
          });
          this.filename = res.filename;
        } finally {
          this.dialogUploadOpen(poid);
          // this.del(this.action + '/' + res.filename);
        }
      },
      dialogUploadError (err) {
        console.log('err', err);
      },
      downloadfile (rowid) {
        let filename = rowid.name;
        window.open(PublicImageServer.src + '/' + 'excel/zxwms/shipment/' + filename);
      },
      async dialogUploadRemove (res, file, fileList) {
        let id = res.poid;
        let ids = [res.id];
        try {
          await this.post('/wmspoenclosure/del', {
            id: id,
            ids: ids,
          });
          // this.tableWatch('table');
        } catch (error) {
          console.log('error:', error);
        }
      },
      dialogUploadSubmit () {
        this.$refs.upload.submit();
      },
      dialogUploadSave () {
        this.dialogUploadInit();
        this.dialogUpload.visible = false;
      },
      tableComplete (row) {
        let ids = [];
        if (row) {
          ids.push(row.id);
        } else {
          if (this.table.multipleSelection.length < 1) {
            return this.$alert('您还未选择，请您至少选择一个！', '提示');
          }
          this.table.multipleSelection.forEach(item => {
            ids.push(item.id);
          });
        }
        this.$confirm('您将标记选择的订单', '确认标记？', {
          confirmButtonText: '是',
          cancelButtonText: '否',
          type: 'warning',
        })
          .then(async _ => {
            try {
              await this.post('/wmsEstimatedArrivalOrder/fulfil', {
                ids,
              });
              this.tableWatch('table');
            } catch (err) {
              console.log(err);
            }
          })
          .catch(_ => {
          });
      },
      tableDelete (row) {
        let tableRef = 'table';

        let ids = [];
        if (row) {
          ids.push(row.id);
        } else {
          if (this[tableRef].multipleSelection.length < 1) {
            return this.$alert('您还未选择，请您至少选择一个！', '提示');
          }
          this[tableRef].multipleSelection.forEach(item => {
            ids.push(item.id);
          });
        }
        this.$confirm('您将删除预计到货通知信息。', '确认删除？', {
          confirmButtonText: '是',
          cancelButtonText: '否',
          type: 'warning',
        }).then(async _ => {
          try {
            await this.post('/wmsEstimatedArrivalOrder/del', {
              ids,
            });
            this.tableWatch('table');
          } catch (err) {
            console.log(err);
          }
        });
      },
      tableExamine (row) {
        let tableRef = 'table';
        let url = '/wmsEstimatedArrivalOrder/auditing';

        let ids = [];
        if (row) {
          ids.push(row.id);
        } else {
          if (this[tableRef].multipleSelection.length < 1) {
            return this.$alert('您还未选择，请您至少选择一个！', '提示');
          }
          this[tableRef].multipleSelection.forEach(item => {
            ids.push(item.id);
          });
        }
        this.$confirm('您将审核预计到货通知信息。', '确认审核？', {
          confirmButtonText: '是',
          cancelButtonText: '否',
          type: 'warning',
        }).then(() => {
          this.post(url, {
            ids,
          });
          this.tableWatch(tableRef);
          this.dialogSearch.visible = false;
        });
      },
      tableQualityTesting (row) {
        console.log('wowo:' + row.zjzt);
        let tableRef = 'table';
        let url = '/wmsEstimatedArrivalOrder/getBill';

        let ids = [];
        if (row) {
          ids.push(row.id);
        } else {
          if (this[tableRef].multipleSelection.length < 1) {
            return this.$alert('您还未选择，请您至少选择一个！', '提示');
          }
          this[tableRef].multipleSelection.forEach(item => {
            ids.push(item.id);
          });
        }
        this.$confirm('您将生成质检单。', '确认生成质检单？', {
          confirmButtonText: '是',
          cancelButtonText: '否',
          type: 'warning',
        }).then(() => {
          this.post(url, {
            ids,
          });
          this.tableWatch(tableRef);
        });
      },
      tableMultiPrint (row) {
        let tableRef = 'table';
        console.log('test');
        let ids = [];
        if (row) {
          ids.push(row.id);
        } else {
          if (this[tableRef].multipleSelection.length < 1) {
            return this.$alert('您还未选择，请您至少选择一个！', '提示');
          }
          this[tableRef].multipleSelection.forEach(item => {
            ids.push(item.id);
          });
        }
        this.$confirm(`您将打印 ${row.asnbh || this.table.multipleSelection.length + '个'} 供货清单。`, '确认打印？', {
          confirmButtonText: '是',
          cancelButtonText: '否',
          type: 'warning',
        }).then(async () => {
          let LODOP = GetLodop();
          const Left = 0;
          LODOP.PRINT_INIT('打印供货清单');
          let json = await this.post('/wmsEstimatedArrivalOrder/print', {
            ids,
          });
          for (let item of json) {
            let qingdan = new Vue({
              el: document.createElement('div'),
              render (h) {
                return h(
                  'gonghuoqingdan', {
                    props: {
                      print: this.print,
                      table: this.table,
                    },
                  }
                );
              },
              data: {
                print: item,
                table: {
                  ...__tableMx(),
                  data: item.detail,
                },
              },
              components: {
                'gonghuoqingdan': Gonghuoqingdan,
              },
            });
            let HTML = `<html>
${header()}
<body>
${qingdan.$el.innerHTML}
</body>
</html>`;
            LODOP.NewPage();
            LODOP.ADD_PRINT_HTM(0, Left, '100%', '100%', HTML);
            LODOP.ADD_PRINT_BARCODE(141, 462, 200, 45, '128A', item.cgdh);
            LODOP.ADD_PRINT_BARCODE(253, 138, 200, 45, '128A', item.fhdrkm);
          }
          LODOP.PREVIEW();
        });
      },
      tableAppointment (row) {},

      dialogInit () {
        this.dialog.title = '新增';
        this.dialog.activeName = '1';
        this.dialog.gys = __dialogGys();
        this.dialog.wmsPurchaseOrder = [];
        this.dialog.id = [];
        this.dialog.po = false;
        this.dialog.activeName = '1';
        this.formDialog1 = {
          ...this.formDialog1,
          ...this.ObjectClone(__form1()),
        };
        this.resetFields('formDialog1');
        this.tableClear('tableMx');
      },
      async dialogOpen (type, more, ids) {
        if (this.dialogAdd.visible) this.dialogAdd.visible = false;
        if (type) {
          type = type.toUpperCase();
        } else return;
        let auto = [
          async () => {
            if (!this.DICTIONARY_goods) {
              await this.USE('DICTIONARY_daohuo');
            }
          },
          async () => {
            this.dialog.id = await this.get('/wmsPurchaseOrder/getWmsOwnerSupplierByHzid');
          },
          async () => {
            this.dialog.wmsPurchaseOrder = await this.post('/wmsPurchaseOrder/getPoLx', {
              'ddlx': '',
            });
          },
        ];
        switch (type) {
        case 'ADD':
          this.dialog.title = '新增';
          await AutoPromise([
            ...auto,
            async () => {
              this.formDialog1 = {
                ...this.formDialog1,
                ...this.ObjectClone(__form1_origin(), await this.get('/wmsEstimatedArrivalOrder/getInfoByNew/0')),
              };
            },
          ]);
          break;
        case 'PUT':
          this.dialog.title = '修改';
          await AutoPromise([
            ...auto,
          ]);
          let step = Object.assign({}, more);
          delete step.shzt;
          this.formDialog1 = {
            ...this.formDialog1,
            ...this.ObjectClone(__form1(), step),
            yjdhsj: [new Date(step.yjdhsjks), new Date(step.yjdhsjjs)],
          };
          this.dialogRemoteShzt(step.asnlx);
          if (more.dycgdid) {
            this.dialog.po = true;
          }
          break;
        case 'PO':
          this.dialog.title = '新增';
          await AutoPromise([
            ...auto,
            async () => {
              let json = await this.get('/wmsEstimatedArrivalOrder/getInfoByNew/' + this.dialogPoMx.row.id);
              // let {contentList} = await this.post('/wmsownersupplier/list', {'id': json.gysid, 'page': 1, 'rows': 20});
              this.formDialog1 = {
                ...this.formDialog1,
                ...this.ObjectClone(__form1_origin(), json),
                gysid: json.gysid,
                asnlx: json.asnlx,
                yjdhsj: [new Date(json.yjdhsjks), new Date(json.yjdhsjjs)],
              };
              this.dialogRemoteShzt(json.asnlx);
              this.dialogSupplierGysid(this.formDialog1.gysid);
            },
          ]);
          let data = [];
          for (let item of ids) {
            data.push({
              ...item,
              bh: item.hpbh,
              ms: item.bzmc,
              gg: item.gg,
              lock: -1,
            });
          }
          this.tableMx.data = data;
          this.dialog.po = true;
          break;
        }
        this.dialog.row = more;
        this.dialog.visible = true;
      },
      async dialogRemoteASNlx (query) {
        this.dialog.wmsPurchaseOrder = await this.post('/wmsPurchaseOrder/getPoLx', {ddlx: query});
      },
      async dialogRemoteShzt (id) {
        this.dialog.wmsPurchaseOrder.forEach(value => {
          if (value.id === id) {
            this.formDialog1.shzt = value.show_zdsh;
          }
        });
      },
      dialogSupplierGysid (id) {
        this.dialog.id.forEach(value => {
          if (value.id === id) {
            this.formDialog1.gysmc = value.mc;
            this.dialog.gysId = value.id;
          }
        });
      },
      dialogPre () {
        this.dialog.activeName = parseInt(this.dialog.activeName) - 1 + '';
      },
      dialogNext () {
        this.VALIDATE('formDialog' + this.dialog.activeName, option => {
          this.dialog.activeName = parseInt(this.dialog.activeName) + 1 + '';
        });
      },
      tableMxDelete (index, row) {
        this.$confirm('您将删除该条明细。', '确认删除？', {
          confirmButtonText: '是',
          cancelButtonText: '否',
          type: 'warning',
        })
          .then(() => {
            this.tableMx.data.splice(index, 1);
            let i = -1;
            this.tableMx.data.forEach((value, index) => {
              if (value.hpbh === row.hpbh && value.lock === -1) {
                i = index;
              }
            });
            if (i !== -1) {
              this.tableMx.data[i].yqsl = parseInt(this.tableMx.data[i].yqsl) + parseInt(row.yqsl);
            } else {
              console.warn('没有找到 对应的元数据！');
            }
          });
      },
      async dialogSave () {
        if (this.dialog.title === '新增') {
          if (this.tableMx.data.length < 1) {
            return this.$alert('新增 预期到货通知单 中 明细不能为空！', '提示');
          }
          try {
            if (this.dialog.po) {
              let data = [];
              let check = true;
              this.tableMx.data.forEach(item => {
                if (item.lock === -1 && parseInt(item.yqsl) !== 0) {
                  check = false;
                }
                if (item.lock !== -1) {
                  let step = {};
                  for (let index in item) {
                    if (item.hasOwnProperty(index)) {
                      if (item[index]) {
                        step[index] = item[index];
                      }
                    }
                  }
                  data.push(step);
                }
              });
              if (!check) {
                return this.$alert('明细中 存在未分配完全的， 无法保存！', '提示');
              }
              let json = {
                ...this.FORMOPTION('formDialog1'),
                detailed: data,
              };
              delete json.shzt;
              delete json.dysj;
              json.dycgdid = this.dialogPoMx.row.id;
              await this.post('/wmsEstimatedArrivalOrder/add', json);
              this.dialogPoMxInit();
              this.dialogPoMx.visible = false;
              this.dialogPoInit();
              this.dialogPo.visible = false;
            } else {
              let data = [];
              this.tableMx.data.forEach(item => {
                let step = {};
                for (let index in item) {
                  if (item.hasOwnProperty(index)) {
                    if (item[index]) {
                      step[index] = item[index];
                    }
                  }
                }
                step.dycgmxid = '0';
                data.push(step);
              });
              let json = {
                ...this.FORMOPTION('formDialog1'),
                detailed: data,
              };
              json.locking = -1;
              delete json.shzt;
              await this.post('/wmsEstimatedArrivalOrder/add', json);
            }
            this.tableWatch('table');
            this.dialogInit();
            this.dialog.visible = false;
          } catch (err) {
            console.error(err);
          }
        } else {
          this.VALIDATE('formDialog1', async option => {
            delete option.shzt;
            delete option.cjsj;
            option.id = this.dialog.row.id;
            await this.put('/wmsEstimatedArrivalOrder/edit', option);
            this.tableWatch('table');
            this.dialogInit();
            this.dialog.visible = false;
          });
        }
      },

      dialogMxInit () {
        this.dialogMx.row = {};
        this.dialogMx.step = {};
        this.dialogMx.packValue = {
          bzlx: '0',
        };
        this.dialogMx.data = {};
        // this.dialogMx.hpid = [];
        this.dialogMx.pack = [];
        this.formDialogMx = {
          ...this.formDialogMx,
          ...this.ObjectClone(__formDialogMx()),
        };
        this.resetFields('formDialogMx');
        this.dialogMx.title = '新增';
      },
      async dialogMxOpen (type, row) {
        if (type) {
          type = type.toUpperCase();
        } else return;
        switch (type) {
        case 'ADD':
          await AutoPromise([
            async () => {
              this.dialogMxRemoteBh('');
            },
          ]);
          this.dialogMx.title = '新增';
          break;
        case 'PO':
          this.dialogMx.title = '分配';
          this.dialogMx.row = row;
          this.dialogMx.step = Object.assign({}, row);
          if (!this.$refs.formDialogMx) {
            setTimeout(async () => {
              let unwatch = this.$watch('dialogMx.pack', () => {
                if (this.dialogMx.pack.length > 1) {
                  unwatch();
                  let unwatch2 = this.$watch('formDialogMx.ms', () => {
                    unwatch2();
                    let unwatch3 = this.$watch('formDialogMx.sum', () => {
                      unwatch3();
                      this.formDialogMx.sum = this.formDialogMxje || 0;
                    });
                    this.formDialogMx.yqsl = this.dialogMx.step.yqsl || 0;
                    this.formDialogMx.xdwsl = this.dialogMx.step.xdwsl || '';
                  });
                  this.formDialogMx.ms = this.dialogMx.step.ms;
                }
              });
              await this.dialogMxRemoteBh(row.bh);
              await this.dialogMxChangeBh(row.bh);
              this.formDialogMx = {
                ...this.formDialogMx,
                ...this.ObjectClone(__formDialogMx(), row),
                hppc: FormatterTime(new Date(), 21),
                scrq: new Date(new Date().toLocaleDateString()),
              };
            }, 250);
          } else {
            let unwatch = this.$watch('dialogMx.pack', () => {
              if (this.dialogMx.pack.length > 1) {
                unwatch();
                let unwatch2 = this.$watch('formDialogMx.ms', () => {
                  unwatch2();
                  let unwatch3 = this.$watch('formDialogMx.sum', () => {
                    unwatch3();
                    this.formDialogMx.sum = this.dialogMx.step.je || 0;
                  });
                  this.formDialogMx.yqsl = this.dialogMx.step.yqsl || 0;
                  this.formDialogMx.xdwsl = this.dialogMx.step.xdwsl || '';
                });
                this.formDialogMx.ms = this.dialogMx.step.ms;
              }
            });
            this.formDialogMx = {
              ...this.formDialogMx,
              ...this.ObjectClone(__formDialogMx(), row),
              hppc: FormatterTime(new Date(), 21),
              scrq: new Date(new Date().toLocaleDateString()),
            };
          }
          break;
        case 'PUT':
          this.dialogMx.title = '修改';
          let step = Object.assign({}, row);
          if (!step.hppc) {
            step.hppc = FormatterTime(new Date(), 21);
          }
          if (!step.scrq) {
            step.scrq = new Date();
          }
          delete step.bzmc;
          this.dialogMx.row = row;
          this.dialogMx.step = step;
          if (!this.$refs.formDialogMx) {
            setTimeout(async () => {
              let unwatch = this.$watch('dialogMx.pack', () => {
                if (this.dialogMx.pack.length > 1) {
                  unwatch();
                  let unwatch2 = this.$watch('formDialogMx.ms', () => {
                    unwatch2();
                    let unwatch3 = this.$watch('formDialogMx.sum', () => {
                      unwatch3();
                      this.formDialogMx.sum = this.dialogMx.step.je || 0;
                    });
                    this.formDialogMx.yqsl = this.dialogMx.step.yqsl || 0;
                    this.formDialogMx.xdwsl = this.dialogMx.step.xdwsl || '';
                  });
                  this.formDialogMx.ms = this.dialogMx.step.ms;
                }
              });
              await this.dialogMxRemoteBh(this.dialogMx.step.bh);
              await this.dialogMxChangeBh(this.dialogMx.step.bh);
              this.formDialogMx = {
                ...this.formDialogMx,
                ...this.ObjectClone(__formDialogMx(), step),
              };
            }, 250);
          } else {
            let unwatch = this.$watch('dialogMx.pack', () => {
              if (this.dialogMx.pack.length > 1) {
                unwatch();
                let unwatch2 = this.$watch('formDialogMx.ms', () => {
                  unwatch2();
                  let unwatch3 = this.$watch('formDialogMx.sum', () => {
                    unwatch3();
                    this.formDialogMx.sum = this.dialogMx.step.je || 0;
                  });
                  this.formDialogMx.yqsl = this.dialogMx.step.yqsl || 0;
                  this.formDialogMx.xdwsl = this.dialogMx.step.xdwsl || '';
                });
                this.formDialogMx.ms = this.dialogMx.step.ms;
              }
            });
            this.formDialogMx = {
              ...this.formDialogMx,
              ...this.ObjectClone(__formDialogMx(), row),
            };
          }
          break;
        }
        this.dialogMx.visible = true;
        this.rkdwControl = 0;
      },
      dialogMxChangeBh (goodsBh) {
        this.formDialogMx.yqsl = '';
        this.formDialogMx.xdwsl = '';
        this.dialogMx.hpid.forEach(value => {
          if (value.goodsBh === goodsBh) {
            this.dialogMx.data = value;
            this.formDialogMx.mc = value.goodsName;
            this.formDialogMx.gg = value.gg;
            this.dialogMx.zqlx = value.zqlx;
            console.log('value.gg:' + value.gg);
            this.formDialogMx.ms = '';
            this.dialogMx.packValue = {
              bzlx: '0',
            };
            this.dialogMxRemotePack(value.packId);
          }
        });
      },
      async dialogMxRemoteBh (Bh) {
        this.dialogMx.hpid = await this.post('/wmsPurchaseOrder/getGoods', {
          bh: Bh,
          gysid: this.dialogSearch.row.gysid || this.formDialog1.gysid,
        });
      },
      dialogMxChangeMs (ms) {
        this.formDialogMx.yqsl = '';
        this.formDialogMx.xdwsl = '';
        this.dialogMx.pack.forEach(value => {
          if (value.ms === ms) {
            this.dialogMx.packValue = value;
            this.formDialogMx = {
              ...this.formDialogMx,
              ...this.ObjectClone(__formDialogMx_pack(), value),
            };
          }
        });
      },
      async dialogMxRemotePack (packId) {
        this.dialogMx.pack = await this.get('/wmsPurchaseOrder/packDetailList/' + packId);
      },
      dialogMxSave () {
        this.VALIDATE('formDialogMx', async option => {
          option.sxrq = (new Date(this.formDialogMxsxrq)).getTime();
          /*
          if (parseInt(this.formDialogMxje) !== parseInt(option.sum)) {
            try {
              await this.$confirm('发现 金额 与 系统计算 有出入, 是否继续?', '提示', {
                confirmButtonText: '确认，是我手动修改的！',
                cancelButtonText: '我填错了',
                type: 'warning',
              });
            } catch (err) {
              return;
            }
          }
          */
          let table = 'tableMx';
          if (this.dialogSearch.row.id) {
            table = 'tableSearch';
          }
          if (table === 'tableMx') {
            let check = true;
            if (this.dialogMx.title === '分配') {
              if (option.yqsl > this.dialogMx.row.yqsl) {
                return this.$alert(`发现 预期数量超出限制！

最大预期数量为： ${this.dialogMx.row.yqsl}

您要分配的数量为: ${option.yqsl}
`, '提示');
              }
              this[table].data.forEach((value, index) => {
                if (option.bh === value.bh && option.hppc === value.hppc && Math.abs(option.scrq - value.scrq) < 43200000) {
                  this.$alert(`发现 完全相同的

货品编号 ${value.bh}
货品批次 ${value.hppc}
生产日期 ${this.formatterTime(option.scrq)}

已经存在！`, '提示');
                  check = false;
                }
              });
              if (check) {
                this.dialogMx.row.yqsl -= option.yqsl;
                this[table].data.push({
                  ...option,
                  hpid: this.dialogMx.data.goodsId,
                  zdwid: this.dialogMx.packValue.id,
                  je: this.formDialogMx.sum,
                  hpbh: option.bh,
                  hpmc: option.mc,
                });
                this[table].total++;
                this.dialogMxInit();
                this.dialogMx.visible = false;
              }
            } else {
              let {bh, hppc, scrq} = this.dialogMx.row;

              this[table].data.forEach((value, index) => {
                if (bh === value.bh && hppc === value.hppc && scrq - value.scrq < 43200000) {
                  this[table].data.splice(index, 1);
                } else if (option.bh === value.bh && option.hppc === value.hppc && Math.abs(option.scrq - value.scrq) < 43200000) {
                  this.$alert(`发现 完全相同的

货品编号 ${value.bh}
货品批次 ${value.hppc}
生产日期 ${this.formatterTime(option.scrq)}

已经存在！`, '提示');
                  check = false;
                }
              });
              if (check) {
                this[table].data.push({
                  ...option,
                  hpid: this.dialogMx.data.goodsId,
                  zdwid: this.dialogMx.packValue.id,
                  je: this.formDialogMx.sum,
                  hpbh: option.bh,
                  hpmc: option.mc,
                });
                this[table].total++;
                this.dialogMxInit();
                this.dialogMx.visible = false;
              }
            }
          } else {
            /*
            try {
              if (this.dialogMx.title === '新增') {
                await this.post('/wmsPurchaseOrderDetailed/add', {
                  ...option,
                  hpid: this.dialogMx.data.goodsId,
                  zdw: this.dialogMx.packValue.id,
                  sscgdid: this.dialogSearch.row.id,
                  je: this.formDialogMx.sum,
                  hpbh: option.bh,
                  hpmc: option.mc,
                });
              } else {
                await this.post('/wmsPurchaseOrderDetailed/edit', {
                  ...option,
                  hpid: this.dialogMx.data.goodsId,
                  zdw: this.dialogMx.packValue.id,
                  sscgdid: this.dialogSearch.row.id,
                  id: this.dialogMx.row.id,
                  je: this.formDialogMx.sum,
                  hpbh: option.bh,
                  hpmc: option.mc,
                });
              }
              this.tableSearch.data = await this.get('/wmsPurchaseOrder/wmsPurchaseOrderDetailList/' + this.dialogSearch.row.id);
              this.dialogMxInit();
              this.dialogMx.visible = false;
            } catch (err) {
              console.error(err);
            }
            */
          }
        });
      },

      dialogSearchInit () {
        this.dialogSearch.row = {};
      },
      async dialogSearchOpen (row) {
        this.dialogSearch.row = row;
        this.tableSearch.data = await this.post('/wmsEstimatedArrivalOrderDetailed/list/' + row.id);
        this.dialogSearch.visible = true;
      },
      tableSearchDelete (row) {
        let id = this.dialogSearch.row.id;
        let tableRef = 'tableSearch';
        let deleteUrl = '/wmsEstimatedArrivalOrderDetailed/delete';
        let tips = '预期到货通知单明细';

        let ids = [];
        if (row) {
          ids.push(row.id);
        } else {
          if (this[tableRef].multipleSelection.length < 1) {
            return this.$alert('您还未选择，请您至少选择一个！', '提示');
          }
          this[tableRef].multipleSelection.forEach(item => {
            ids.push(item.id);
          });
        }
        this.$confirm('您将删除' + tips + '。', '确认删除？', {
          confirmButtonText: '是',
          cancelButtonText: '否',
          type: 'warning',
        })
          .then(async _ => {
            try {
              await this.post(deleteUrl, {
                id,
                ids,
              });
              // this.tableWatch(tableRef);
              this.tableSearch.data = await this.post('/wmsEstimatedArrivalOrderDetailed/list/' + this.dialogSearch.row.id);
              // this.tableSearch.data = await this.get('/wmsPurchaseOrder/wmsPurchaseOrderDetailList/' + this.dialogSearch.row.id);
            } catch (err) {
              console.log(err);
            }
          })
          .catch(_ => {
          });
      },
      dialogSearchSave () {
        this.dialogSearchInit();
        this.dialogSearch.visible = false;
      },

      dialogPoInit () {
        this.tableClear('tableTqpo');
      },
      async dialogPoOpen () {
        if (this.dialogAdd.visible) this.dialogAdd.visible = false;
        this.tableWatch('tableTqpo');
        this.dialogPo.visible = true;
      },
      dialogPoSave () {
        this.dialogPoInit();
        this.dialogPo.visible = false;
      },

      dialogPoMxInit () {
        this.dialogPoMx.row = {};
        this.tableClear('tableTqpoMx');
      },
      async dialogPoMxOpen (row) {
        let json = await this.get('/wmsEstimatedArrivalOrder/getPoDetailed/' + row.id);
        this.tableSetData('tableTqpoMx', json);
        this.dialogPoMx.row = row;
        this.dialogPoMx.visible = true;
      },

      dialogPoMxSave () {
        let tableRef = 'tableTqpoMx';

        if (this[tableRef].multipleSelection.length < 1) {
          return this.$alert('您还未选择，请您至少选择一个！', '提示');
        }
        this.dialogOpen('po', this.dialogPoMx.row, this[tableRef].multipleSelection);
      },
      dialogASNInit () {},
      async dialogASNOpen (row) {
        try {
          this.tableASN.data = await this.post('/wmsEstimatedArrivalOrderDetailed/list/' + row.id);
          this.dialogASN.visible = true;
        } catch (err) {
          console.error(err);
        }
      },
    },
    computed: {
      action: function () {
        return PublicImageServer.src + '/' + PublicImageServer.upload + '/excel/zxwms/shipment';
      },
      formDialogMxje: function () {
        return this.formDialogMx.je;
        /*
        if (this.formDialogMx.yqsl) {
          return this.formDialogMx.je * this.formDialogMx.yqsl;
        } else {
          return this.formDialogMx.je;
        }
        */
      },
      formDialogMxzl: function () {
        if (this.formDialogMx.yqsl) {
          return this.formDialogMx.zl * this.formDialogMx.yqsl;
        } else {
          return this.formDialogMx.zl;
        }
      },
      formDialogMxjz: function () {
        if (this.formDialogMx.yqsl) {
          return this.formDialogMx.jz * this.formDialogMx.yqsl;
        } else {
          return this.formDialogMx.jz;
        }
      },
      formDialogMxtj: function () {
        if (this.formDialogMx.yqsl) {
          return this.formDialogMx.tj * this.formDialogMx.yqsl;
        } else {
          return this.formDialogMx.tj;
        }
      },
      formDialogMxsxrq: function () {
        // console.log('zqlx' + this.dialogMx.zqlx);
        if (this.dialogMx.zqlx === '0') {
          if (this.dialogMx.data.yxq && this.formDialogMx.scrq) {
            if (typeof this.formDialogMx.scrq === 'number') {
              return this.formatterTime(new Date(this.dialogMx.data.yxq *
                86400000 + this.formDialogMx.scrq));
            } else {
              return this.formatterTime(new Date(this.dialogMx.data.yxq *
                86400000 + this.formDialogMx.scrq.getTime()));
            }
          } else {
            return '';
          }
        } else {
          if (this.dialogMx.data.yxq && this.formDialogMx.scrq) {
            return this.formatterTime(new Date(this.dialogMx.data.yxq *
              86400000 + new Date().getTime()));
          } else {
            return '';
          }
        }
      },
    },
    watch: {
      'formDialogMx.yqsl': function (item) {
        let sum = parseInt(this.formDialogMx.je * this.formDialogMx.yqsl);
        this.formDialogMx.sum = isNaN(sum) ? 0 : sum;
        if (item && this.dialogMx.packValue.bzlx === 0 && this.dialogMx.packValue.zdwsl) {
          let zdwsl = parseInt(this.dialogMx.packValue.zdwsl);
          let source = parseInt(item);
          this.formDialogMx.xdwsl = `${Math.floor(source / zdwsl)}箱${source % zdwsl}件`;
        }
      },
      'formDialogMx.xdwsl': function (item) {
        if (this.rkdwControl >= 0) {
          this.rkdwControl++;
        };
        if (item && this.dialogMx.packValue.bzlx !== 0 && this.dialogMx.packValue.zdwsl) {
          let reg = /(\d{1,5})箱(\d{1,5})件/;
          if (reg.test(item)) {
            let zdwsl = parseInt(this.dialogMx.packValue.zdwsl);
            let source = reg.exec(item);
            let xiang = parseInt(source[1]);
            let jian = parseInt(source[2]);
            if (this.rkdwControl === 3) {
              this.formDialogMx.xdwsl = `${Math.floor(this.formDialogMx.yqsl / zdwsl)}箱${this.formDialogMx.yqsl % zdwsl}件`;
            }
            if (this.rkdwControl > 3) {
              this.formDialogMx.yqsl = xiang * zdwsl + jian + '';
            }
          }
        }
      },
    },
    mounted: async function () {
      console.log('daohuo');
      this.tableWatch('table');
      await AutoPromise([
        async () => {
          if (!this.DICTIONARY_daohuo) {
            await this.USE('DICTIONARY_daohuo');
          }
        },
        async () => {
          if (this.dictionary.asnlx.length === 0) {
            this.dictionary.asnlx = await this.post('/wmsPurchaseOrder/getPoLx', {ddlx: ''});
          }
        },
      ]);
      console.log(this);
    },
  });
  function header () {
    return `
<head>
<style>
/* reset */
html {
  overflow: hidden;
}

body, div, dl, dt, dd, ul, ol, li, pre, code, form, fieldset, legend, textarea, blockquote, th, td, input, select, textarea, button {
  margin: 0;
  padding: 0
}

/* 初始化标签在所有浏览器中的margin、padding值 */
fieldset, img {
  border: 0 none
}

/* 重置fieldset（表单分组）、图片的边框为0*/
dl, ul, ol, menu, li {
  list-style: none
}

/* 重置类表前导符号为onne,menu在HTML5中有效 */
blockquote, q {
  quotes: none
}

/* 重置嵌套引用的引号类型 */
blockquote:before, blockquote:after, q:before, q:after {
  content: '';
  content: none
}

/* 重置嵌套引用*/
input, select, textarea, button {
  vertical-align: middle
}

/* 重置表单控件垂直居中*/
button {
  border: 0 none;
  background-color: transparent;
  cursor: pointer
}

/* 重置表单button按钮效果 */
body {
  background: #fff
}

/* 重置body 页面背景为白色 */
body, th, td, input, select, textarea, button {
}

/* 重置页面文字属性 */
a {
  color: #666;
  text-decoration: none
}

/* 重置链接a标签 */
a:active, a:hover {
  text-decoration: none
}

/* 重置链接a标签的鼠标滑动效果 */
address, caption, cite, code, dfn, em, var {
  font-style: normal;
  font-weight: normal
}

/* 重置样式标签的样式 */
caption {
  display: none;
}

/* 重置表格标题为隐藏 */
table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  table-layout: fixed;
}

/* 重置table属性 */
img {
  vertical-align: top
}

/* 图片在当前行内的垂直位置 */

/* 页面设置 */

/* 取消a标签点击后的虚线框 */
a {
  outline: none;
}

a:active {
  star: expression(this.onFocus=this.blur());
}

/*清除浮动*/
.clear {
  clear: both;
}

/*清除浮动--推荐使用*/
.clearfix:before, .clearfix:after {
  content: '';
  display: table;
}

.clearfix:after {
  clear: both;
}

.print_card {
    margin-bottom: 5px;
}

.print_card .el-card__header {
    padding: 10px 20px;
}

.print_card .el-card__header span {
    font-size: 16px;
    font-weight: bolder;
}

.print_card .el-card__header span {
    font-size: 16px;
    font-weight: bolder;
}

.print_card .el-form-item {
    margin-bottom: 0;
}

.el-card {
    border: 1px solid #d1dbe5;
    border-radius: 4px;
    background-color: #fff;
    overflow: hidden;
    box-shadow: 0 2px 4px 0 rgba(0,0,0,.12), 0 0 6px 0 rgba(0,0,0,.04);
}

.el-card__header {
    padding: 18px 20px;
    border-bottom: 1px solid #d1dbe5;
    box-sizing: border-box;
}

.el-card__body {
    padding: 20px;
}

.el-row {
    position: relative;
    box-sizing: border-box;
}

.el-row:after {
    clear: both;
}

.el-progress-bar__inner:after, .el-row:after, .el-row:before, .el-slider:after, .el-slider:before, .el-slider__button-wrapper:after, .el-upload-cover:after {
    content: "";
}

.el-row:after, .el-row:before {
    display: table;
}

.el-col-lg-11 {
    width: 45.83333%;
}

.el-col-lg-offset-0 {
    margin-left: 0;
}

.el-col-lg-offset-1 {
    margin-left: 4.16667%;
}

.el-form-item__label {
    text-align: right;
    vertical-align: middle;
    float: left;
    font-size: 14px;
    color: #48576a;
    line-height: 1;
    padding: 11px 12px 11px 0;
    box-sizing: border-box;
}


.el-form-item__content {
    line-height: 36px;
    position: relative;
    font-size: 14px;
    float: left;
}

.el-col-24 {
    float: left;
    box-sizing: border-box;
}

.el-dialog__header .title p {
    line-height: 1;
    font-size: 18px;
    font-weight: 700;
    color: #1f2d3d;
    padding:0 0px;
    margin: 10px -5px;
}

.el-dialog__header .title span {
  float: right;
  font-size: 14px;
  margin-right: 30px;
}

body {
  width: 98%;
  border: 1px solid #d1dbe5;
  border-radius: 4px;
  padding: 0 1%;
}

td, th {
  text-align: center;
  border-right: 1px solid #dfe6ec;
  border-bottom: 1px solid #dfe6ec;
}

.mx .el-card__body {
  padding: 0;
}
</style>
</head>
    `;
  }
</script>
<style scoped lang="scss">
  .box-card {
    margin: 20px;
  }

  .createTimeSpan {
    display: block;
    margin-top: 34px;
  }

  @media screen and (max-width: 800px) {
    .createTimeSpan {
      margin-top: 0;
    }
    .box-card {
      margin: 0;
    }
  }

  .el-select {
    width: 100%;
  }
</style>

<style lang="scss">
  .goods{
    width: 88vw;
    float: left;
  }

  .print_card {
    margin-bottom: 5px;
    .el-card__header {
      padding: 10px 20px;
      span {
        font-size: 16px;
        font-weight: bolder;
      }
    }
    .el-form-item {
      margin-bottom: 0;
    }
  }
</style>
